{% extends "SalarySysMenu/Main.html" %}
{% load staticfiles %}
{% block CSSAnotherhead %}
<!-- DataTables -->
<link rel="stylesheet" type="text/css" href="{% static 'bower_components/datatable/datatables.min.css'%}"/>
{% endblock %}
{% block bodyhead %}

<body class="hold-transition skin-purple-light sidebar-mini" onload="initPage()">

  {% endblock %}

  {% block MySign %}
  <li class="active treeview">
    <a href="#">
      <i class="fa fa fa-mouse-pointer"></i>
      <span> 考勤状态</span>
      <span class="pull-right-container">
        <i class="fa fa-angle-left pull-right"></i>
      </span>
    </a>
    <ul class="treeview-menu">
      <li><a href="{% url 'GZGL:Signin' %}"><i class="fa fa-circle-o"></i> 考勤操作</a></li>
      <li class="active"><a href="{% url 'GZGL:SignDetails' %}"><i class="fa fa-circle-o"></i> 查看考勤详情</a></li>

    </ul>
  </li>
  {% endblock %}
  {% block content %}
  <!-- Content Wrapper. Contains page content -->
  <div class="content-wrapper">
    <!-- Content Header (Page header) -->
    <section class="content-header">
      <h1>
        考勤详情
        <small>考勤表</small>
      </h1>
      <ol class="breadcrumb">
        <li><a href="#"><i class="fa fa-dashboard"></i> Level</a></li>
        <li class="active">Here</li>
      </ol>

    </section>

    <!-- Main content -->
    <section class="content container-fluid">

      <!--------------------------
        | Your Page Content Here |
        -------------------------->
      <div class="row">
        <div class="col-xs-12">
          <div class="box">
            <div class="box-header">
              <h3 class="box-title">{{here.staff_name}}的考勤表</h3>
            </div>
            <!-- /.box-header -->
            <div class="box-body">
              <table id="example5" class="table table-bordered table-striped">
                <thead>
                  <tr>
                    <th>考勤代码</th>

                    <th>打卡日期</th>
                    <th>员工姓名</th>
                    <th>员工ID</th>
                    <th>签到时间</th>
                    <th>签退时间</th>
                    <th>工作时间</th>
                    <th>工作状态</th>
                    <th>异常申报</th>
                  </tr>
                </thead>
                <tbody>
                  {% for sign in sign_list %}


                  <tr>
                    <td>{{sign.id}}</td>
                    <td>{{sign.sign_Date}}</td>
                    <td>{{here.staff_name}}</td>
                    <td>{{sign.sign_id}}</td>
                    <td>
                      {{sign.sign_time_hour}}:{% if sign.sign_time_min < 10 %}0{{sign.sign_time_min}}{% else %}{{sign.sign_time_min}}{% endif %}
                    </td>
                    <td>
                      {{sign.signout_time_hour}}:{% if sign.signout_time_min < 10 %}0{{sign.signout_time_min}}{% else %}{{sign.signout_time_min}}{% endif %}
                    </td>
                    <td>{{sign.work_time_hour}} h
                      {% if sign.work_time_min < 10 %}0{{sign.work_time_min}}{% else %}{{sign.work_time_min}}{% endif %}
                      min </td>
                    <td>{{sign.worktime_status}}</td>
                    <td>

                      <form action="{% url 'GZGL:ReportSignFromClick' %}" method="POST">
                        {% csrf_token %}
                        <input type="hidden" name="signcode" class="form-control" value="{{sign.id}}">
                        <input type="hidden" name="signdate" class="form-control" value="{{sign.sign_Date}}">
                        <button type="submit" class="btn btn-block btn-warning btn-sm">提交</button>
                      </form>
                    </td>
                  </tr>

                  {% empty %}
                  <td></td>
                  <td></td>
                  <td></td>
                  <td></td>
                  <td></td>
                  <td></td>
                  <td><label class="control-label" style="color: #dd4b39; text-align: center;">
                      <i class="fa fa-times"></i> 抱歉，您尚未打卡考勤！</label></td>

                  {% endfor %}
                </tbody>
                <tfoot>
                  <tr>
                    <th>考勤代码</th>

                    <th>打卡日期</th>
                    <th>员工姓名</th>
                    <th>员工ID</th>
                    <th>签到时间</th>
                    <th>签退时间</th>
                    <th>工作时间</th>
                    <th>工作状态</th>
                    <th>异常申报</th>
                  </tr>
                </tfoot>
              </table>
            </div>
            <!-- /.box-body -->
          </div>
        </div>
      </div>
    </section>
    <!-- /.content -->
  </div>
  <!-- /.content-wrapper -->
  {% endblock %}
  {% block JSAnotherFile %}
  <!-- SlimScroll -->
  <script src="{% static 'bower_components/jquery-slimscroll/jquery.slimscroll.min.js'%}"></script>
  <!-- FastClick -->
  <script src="{% static 'bower_components/fastclick/lib/fastclick.js'%}"></script>
  <!-- DataTables -->
  <script src="{% static 'bower_components/datatable/datatables.min.js'%}"></script>

  <script src="{% static 'js/data-table.js'%}"></script>


  {% endblock %}